/*
 * Copyright 2019 WeBank
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.webank.wedatasphere.qualitis.project.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

/**
 * @author 审批
 */
@Entity
@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = "@id")
@Table(name = "qualitis_approved")
public class ProjectApproved implements Serializable {

    private static final long serialVersionUID = -429065239198706646L;


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 审批时间
     */
    @Column(length = 170,name = "approved_time")
    private String approvedTime;


    /**
     * 审批人
     */
    @Column(name = "approved_user")
    private String approvedUser;

    /**
     * 标准
     */
    @Column(name = "approved_biao_zun_id")
    private Long approvedBiaoZunId;

    /**
     * 标准审批记录层
     */
    @Column(name = "approved_version")
    private Long approvedVersion;

    /**
     * 审批操作
     */
    @Column(length = 50,name = "approved_operation")
    private String approvedOperation;

    @Column(name = "approved_msg", length = 50)
    private String approvedMsg;

    @Override
    public String toString() {
        return "ProjectApproved{" +
                "id=" + id +
                ", approvedTime='" + approvedTime + '\'' +
                ", approvedUser='" + approvedUser + '\'' +
                ", approvedBiaoZunId=" + approvedBiaoZunId +
                ", approvedVersion=" + approvedVersion +
                ", approvedOperation='" + approvedOperation + '\'' +
                ", approvedMsg='" + approvedMsg + '\'' +
                '}';
    }

    public ProjectApproved(Long id, String approvedTime, String approvedUser, Long approvedBiaoZunId, Long approvedVersion, String approvedOperation, String approvedMsg) {
        this.id = id;
        this.approvedTime = approvedTime;
        this.approvedUser = approvedUser;
        this.approvedBiaoZunId = approvedBiaoZunId;
        this.approvedVersion = approvedVersion;
        this.approvedOperation = approvedOperation;
        this.approvedMsg = approvedMsg;
    }

    public ProjectApproved() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getApprovedTime() {
        return approvedTime;
    }

    public void setApprovedTime(String approvedTime) {
        this.approvedTime = approvedTime;
    }

    public String getApprovedUser() {
        return approvedUser;
    }

    public void setApprovedUser(String approvedUser) {
        this.approvedUser = approvedUser;
    }

    public Long getApprovedBiaoZunId() {
        return approvedBiaoZunId;
    }

    public void setApprovedBiaoZunId(Long approvedBiaoZunId) {
        this.approvedBiaoZunId = approvedBiaoZunId;
    }

    public Long getApprovedVersion() {
        return approvedVersion;
    }

    public void setApprovedVersion(Long approvedVersion) {
        this.approvedVersion = approvedVersion;
    }

    public String getApprovedOperation() {
        return approvedOperation;
    }

    public void setApprovedOperation(String approvedOperation) {
        this.approvedOperation = approvedOperation;
    }

    public String getApprovedMsg() {
        return approvedMsg;
    }

    public void setApprovedMsg(String approvedMsg) {
        this.approvedMsg = approvedMsg;
    }
}
